/**
 * 
 */
package com.aqarat.controller;

import java.util.List;
import java.util.Map;

import javax.persistence.EntityExistsException;

import org.primefaces.model.SortOrder;

import com.aqarat.entity.Apartment;
import com.aqarat.entity.Building;
import com.aqarat.entity.Customer;
import com.aqarat.entity.Expens;
import com.aqarat.entity.Floor;
import com.aqarat.entity.Payment;
import com.aqarat.entity.resultsetmapping.PaymentResultSet;
import com.aqarat.managedBean.ExpensesBean;
import com.core.entity.Lookup;

/**
 * @author karimsherif
 * 
 */
public interface AqaratController {

	public void saveBuilding(Building building, Floor floor, List<Apartment> apartmentList) throws Exception;

	public void saveApartment(Apartment apartment) throws Exception;

	public List<Building> getBuildingList(Building building) throws Exception;

	public List<Floor> getFloorListByBuildingId(Long recid) throws Exception;

	public List<Apartment> getApartmentList(int first, int pageSize,Apartment apartment) ;
	
	public Long getApartmentListRowCount(Apartment apartment);
	
	public void deleteApartment(Apartment apartment) throws Exception;

	public Lookup getLookup(Long lookupId) throws Exception;

	public List<Lookup> getLookupList(Long lookupTypeId) throws Exception;

	public List<Customer> getCustomerList(int first, int pageSize, String sortField, SortOrder sortOrder, Map<String, String> filters, Customer customer);

	public List<Customer> getCustomerListByName(String customerName);

	public Long getCustomerListRowCount(Customer customer);

	public void saleApartment(Apartment apartment) throws Exception;

	public void saveCustomer(Customer customer) throws EntityExistsException, Exception;

	// -------------------------------------------------------------------------//
	// public List<Payment> getPaymentList(Payment payment);
	public List<PaymentResultSet> getPaymentResultSetList(PaymentResultSet paymentResultSet);

	public void payApayment(Payment payment) throws Exception;

	// -------------------------------------------------------------------------//
	public List<Expens> getExpensesList(Long biulgingId) throws Exception;

	public void saveExpenses(Expens expens) throws Exception;

	public Long getExpensListRowCount(Expens expens);

	public List<Expens> getExpensList(int first, int pageSize, String sortField, SortOrder sortOrder, Map<String, String> filters, Expens expens);

	/**
	 * return all buildings<br/>
	 * each building contains recid and name only <br/>
	 * the other parameters will be null
	 * 
	 */
	public List<Building> getBuildingLookupList();

	

}
